<?php
namespace app\admin\controller;
use think\Controller;
use think\Db;
use app\admin\model;

class Courseclassify extends Base {

    //课程分类管理首页
    public function index(){
        $this->isLogin();
       $m = new model\Courseclassify();
       $courseclassify = $m->index();

       $this->assign("Courseclassify",$courseclassify);
       return $this->fetch();

    }

    //删除课程分类
    public function delete(){
        $this->isLogin();
        $m = new model\Courseclassify();
        $res = $m->delete();

        echo json_encode($res);

    }


    //新增课程分类
    public function classifyInsert(){
        $this->isLogin();
        $m = new model\Courseclassify();
        $res = $m->classifyInsert();

        echo json_encode($res);
        exit;

    }


}